user=$1
ip=$2
pwd=$3
path=$4

./check_exports.sh $user $ip $pwd $path|awk '{print $1}'
wait
echo ""
ret=`rpm -qa|grep expect`
if [ -z "$ret" ]; then
echo "Error: Please install the expect"
return
fi


ret=`systemctl status rpcbind|grep enabled`
if [ -z "$ret" ]; then
echo "Error: Please install and enable the rpcbind"
systemctl start rpcbind
else
echo "PASSED: rpcbind has been installed and enabled"
fi

ret=`systemctl status nfs|grep enabled`
if [ -z "$ret" ]; then
echo "Error: Please install and enable the NFS"
systemctl start nfs
else
echo "PASSED: NFS has been installed and enabled"
fi

ret=`systemctl status iptables|grep disable`
if [ -z "$ret" ]; then
echo "Error: Please disable the iptables"
systemctl disable iptables
else
echo "PASSED: iptables has been disable"
fi

ret=`systemctl status firewalld|grep running`
if [ -z "$ret" ]; then
echo "PASSED: firewall has been disable"

else
echo "Error: Please disable the firewall"
systemctl disable firewalld
fi

./firewalld_off.sh

mount -t nfs $ip:$path $path -o nolock





